]> dgit.raspbian.org Git - gnome-shell.git/commit
shell/window-tracker: Track ::window-created
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 16 Nov 2021 19:46:58 +0000 (20:46 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 16 Dec 2021 21:44:35 +0000 (22:44 +0100)
commitacee68c5da8e1bd0216545ff0553674c8a85060e
tree3fcad966c4ea681bb68b87b9f943412ac55d6109
parentf8e531b52ded6a62c41ab8a825124ae6f859de79
shell/window-tracker: Track ::window-created

We currently track windows via MetaWorkspace's ::window-added and
::window-removed signals. Those aren't emitted for override-redirect
windows though, as those aren't actually located on any workspace
(see https://gitlab.gnome.org/GNOME/mutter/-/blob/gnome-41/src/core/window.c#L1322).

While that shouldn't be an issue as there's no good reason to look up
the ShellApp of an OR window, extensions can make modifications that
result in OR windows ending up in places that assume that every window
has an associated ShellApp.

We can either
 - accept that extensions break stuff (including badly)
 - carefully handle app-less windows everywhere
 - extend tracking to OR windows

Opt for the last option, as that's the most user-friendly and least
disruptive one.

It's also simpler to track ::window-created and ::unmanaged, as we
don't have to track workspaces or windows moving between workspaces.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4751

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2029>
src/shell-window-tracker.c